<?php
require_once 'connect.php';

if (isset($_POST) && isset($_POST['gameName']) && isset($_POST['username'])) {
	$username = $_POST['username'];
	$gameName= $_POST['gameName'];

	connect();
	if (addToFavorites($gameName, $username)) {
		echo 'true';
	} else {
		echo 'Already in your favorites';
	}
} else {
	echo 'Unable to add to favorites.';
}
?>